#ifndef LOGONDLG_H
#define LOGONDLG_H

#include <QDialog>
#include "UI_LOGONBASEDLG.H"

#include <QRegExp>

class LogonDlg : public QDialog, public Ui::LogonDlg
{
public:
  LogonDlg(QWidget * parent = 0, Qt::WindowFlags f = 0)
    : QDialog(parent, f)
  {
    setupUi(this);
  }

private:
  bool isPasswordComplex() 
  {
    QRegExp rx("^(?![0-9]{6,13})[0-9a-zA-Z]{6,13}$");
    QString str = lineEditKode->text();
    QStringList list;
    int pos = 0;

    while ((pos = rx.indexIn(str, pos)) != -1) {
      list << rx.cap(1);
      pos += rx.matchedLength();
    }

    return (0 < list.count());
  }

};


#endif LOGONDLG_H